<?php
class DigCms_SiteController extends Zend_Controller_Action
{
    public function cacheAction() {
        Dig_Service_Firebug::log('clearing cache');
        if($this->getRequest()->isPost()) {
            // TODO make it possible to only clear certain parts of the cache
            $cache = Dig_Service_Core::getInstance()->getCache();
            $cache->clean(Zend_Cache::CLEANING_MODE_ALL);
            $this->_helper->json(array(
                'message'   => 'Your cache was successfully cleared',
                'type'      => 'info'
            ));
        }
    }
}
?>
